package beans;

import javax.faces.application.FacesMessage;
import javax.faces.context.FacesContext;  
  
public class MessagesController {  
    
  
    public static void addInfo(String message) {  
        FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO,"Informace", message));  
    }  
  
    public static void addWarn(String message) {  
        FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_WARN,"Varování", message));  
    }  
  
    public static void addError(String message) {  
        FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR,"Chyba", message));  
    }  
  
    public static void addFatal(String message) {  
        FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL,"Konec světa!", "Nechte všeho a zdrhejte!!"));  
    }  
} 
